home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
windows4
/
prndrv.zip
/
MAIN.C
< prev
next >
Wrap
Text File
|
1992-02-20
|
2KB
|
70 lines
//*************************************************************
// File name: main.c
//
// Description:
//
// Contains the message loop for the main application window.
//
//
// Development Team:
//
// Don Miller
//
//
// Written by Microsoft Product Support Services, Windows Developer Support
// Copyright (c) 1992 Microsoft Corporation. All rights reserved.
//*************************************************************
#include <windows.h>
#include "globals.h"
#include "init.h"
#include "prndrv.h"
// Local function prototypes.
int PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
//-----------------------------------------------------------------------
// Function: WinMain
//
// Purpose : Called by Windows on app startup. Initializes everything,
// and enters a message loop.
//
// Parms : hInstance == Handle to _this_ instance.
// hPrevInstance == Handle to last instance of app.
// lpCmdLine == Command Line passed into app.
// nCmdShow == How app should come up (i.e. minimized/normal)
//
// Returns : Return value from PostQuitMessage.
//-----------------------------------------------------------------------
int PASCAL WinMain(HANDLE hInstance, // This instance
HANDLE hPrevInstance, // Last instance
LPSTR lpCmdLine, // Command Line
int nCmdShow) // Minimized or Normal?
{
MSG msg;
if (!hPrevInstance)
if (!InitApplication (hInstance))
return (FALSE);
if (!InitInstance(hInstance, nCmdShow))
return (FALSE);
while (GetMessage(&msg, // Put Message Here
NULL, // Handle of win receiving msg
NULL, // lowest message to examine
NULL)) // highest message to examine
{
TranslateMessage(&msg); // Translates virtual key codes
DispatchMessage(&msg); // Dispatches message to window
}
return (msg.wParam); // Returns the value from PostQuitMessage
}